﻿ #region Disclaimer/Info
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
 //
 //   File:		Category.cs
 //   Website:		http://dexterblogengine.com/
 //   Authors:		http://dexterblogengine.com/About.ashx
 //   Rev:		1
 //   Created:		19/01/2011
 //   Last edit:		19/01/2011
 //   License:		GNU Library General Public License (LGPL)
 //   File:            Category.cs
 //   For updated news and information please visit http://dexterblogengine.com/
 //   Dexter is hosted to Codeplex at http://dexterblogengine.codeplex.com
 //   For any question contact info@dexterblogengine.com
 //
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 #endregion

using System;
using System.Collections.Generic;

namespace Dexter.Domain.Model {
	public partial class Category : EntityBase {
		protected Category ( ) {
			Categories = new List <Category> ( );
		}

		internal Category ( string name , Category parent ) : this ( ) {
			Name = name;
			Parent = parent;
		}

		public virtual bool IsParent { 
			get { return this.Categories.Count > 0; } 
		}

		public virtual bool IsChild {
			get { return this.Parent != null; }
		}

		public virtual Category Parent { get; set; }
		public virtual string Name { get; set; }
		public virtual string Description { get; set; }
		public virtual Uri FeedBurnerUrl { get; set; }
		public virtual int ContentNumber { get; set; }
		public virtual bool IsDefaultCategory { get; set; }
		public virtual IList <Category> Categories { get; protected set; }
	}
}
